package com.yuelan.apartment.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yuelan.apartment.domain.ApaRentBill;
import com.yuelan.apartment.domain.vo.ApaRentBillVo;
import com.yuelan.apartment.domain.vo.ApaRentProfitVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @description:
 * @Author: ZhaoYi
 * @date: 24-6-22 6:49
 */
@Mapper
public interface ApaRentBillMapper extends BaseMapper<ApaRentBill> {


    /**
     * 批量插入租金账单
     */
    int insertBatchRentBill(@Param("rentBillList") List<ApaRentBill> apaRentBillList);

    /**
     * 查询所有租金订单
     */
    List<ApaRentBill> selectRentOrderList(Long id);

    /**
     * 查询租金订单
     */
    ApaRentBill selectRentOrdersById(Long id);

    /** 记录数量 */
    Integer rentStatusTotal(@Param("apartmentId") List<Long> apartmentId,
                            @Param("month") Date month,
                            @Param("status") String status);


    /**
     * 多表联查
     */
    List<ApaRentBillVo> selectBillStatus(@Param("createBy") String createBy,
                                         @Param("date") Date date,
                                         @Param("status") String status);
}
